import { Component, OnInit } from '@angular/core';

import { QuerstionList } from './shared/querstion-list.model';
import { QuerstionListService } from './shared/querstion-list.service';

@Component({
	selector: 'querstion-list',
	templateUrl: 'querstion-list.component.html',
	providers: [QuerstionListService]
})

export class QuerstionListComponent implements OnInit {
	querstionList: QuerstionList[] = [];

	constructor(private querstionListService: QuerstionListService) { }

	ngOnInit() {
		this.querstionListService.getList().subscribe((res) => {
			this.querstionList = res;
		});
	}
}